//
//  GYStoreAllHorCell.m
//  GoodLuck
//
//  Created by apple on 2018/3/14.
//  Copyright © 2018年 yunjiazhineng. All rights reserved.
//

#import "GYStoreAllHorCell.h"

@interface GYStoreAllHorCell ()

@property (weak, nonatomic) IBOutlet UIImageView *goodImageView;
@property (weak, nonatomic) IBOutlet UILabel *goodsNameLable;
@property (weak, nonatomic) IBOutlet UILabel *goodPriceLable;
@property (weak, nonatomic) IBOutlet UILabel *goodsSaleumLable;
@property (weak, nonatomic) IBOutlet UILabel *markLable;


@end
@implementation GYStoreAllHorCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setModel:(GYSearchGoos *)model {
    _model = model;
    
    [self.goodImageView sd_setImageWithURL:[NSURL URLWithString:model.goods_image_url] placeholderImage:[UIImage imageNamed:@"4"]];
    self.goodsNameLable.text = model.goods_name;
    self.goodPriceLable.text = [NSString stringWithFormat:@"¥%@",model.goods_price];
    self.goodsSaleumLable.text = [NSString stringWithFormat:@"销量 %@",model.goods_salenum];
}

- (CGFloat)height:(GYSearchGoos *)goods {
    self.model = goods;
    
    [self layoutIfNeeded];
    
    return CGRectGetMaxY(self.markLable.frame);
}

- (IBAction)moreBtuClick:(UIButton *)sender {
}

@end
